﻿using System;
using HslCommunication.Core.IMessage;

namespace HslCommunication.CNC.Fanuc
{
	/// <summary>
	/// Fanuc床子的消息对象
	/// </summary>
	// Token: 0x0200017C RID: 380
	public class CNCFanucSeriesMessage : INetMessage
	{
		/// <inheritdoc />
		// Token: 0x17000677 RID: 1655
		// (get) Token: 0x06001F35 RID: 7989 RVA: 0x0008CEC2 File Offset: 0x0008B0C2
		public int ProtocolHeadBytesLength
		{
			get
			{
				return 10;
			}
		}

		/// <inheritdoc />
		// Token: 0x17000678 RID: 1656
		// (get) Token: 0x06001F36 RID: 7990 RVA: 0x000978F4 File Offset: 0x00095AF4
		// (set) Token: 0x06001F37 RID: 7991 RVA: 0x000978FC File Offset: 0x00095AFC
		public byte[] HeadBytes { get; set; }

		/// <inheritdoc />
		// Token: 0x17000679 RID: 1657
		// (get) Token: 0x06001F38 RID: 7992 RVA: 0x00097905 File Offset: 0x00095B05
		// (set) Token: 0x06001F39 RID: 7993 RVA: 0x0009790D File Offset: 0x00095B0D
		public byte[] ContentBytes { get; set; }

		/// <inheritdoc />
		// Token: 0x1700067A RID: 1658
		// (get) Token: 0x06001F3A RID: 7994 RVA: 0x00097916 File Offset: 0x00095B16
		// (set) Token: 0x06001F3B RID: 7995 RVA: 0x0009791E File Offset: 0x00095B1E
		public byte[] SendBytes { get; set; }

		/// <inheritdoc />
		// Token: 0x06001F3C RID: 7996 RVA: 0x00097928 File Offset: 0x00095B28
		public bool CheckHeadBytesLegal(byte[] token)
		{
			return true;
		}

		/// <inheritdoc />
		// Token: 0x06001F3D RID: 7997 RVA: 0x0009793C File Offset: 0x00095B3C
		public int GetContentLengthByHeadBytes()
		{
			return (int)this.HeadBytes[8] * 256 + (int)this.HeadBytes[9];
		}

		/// <inheritdoc />
		// Token: 0x06001F3E RID: 7998 RVA: 0x00097968 File Offset: 0x00095B68
		public int GetHeadBytesIdentity()
		{
			return 0;
		}

		/// <inheritdoc />
		// Token: 0x06001F3F RID: 7999 RVA: 0x0009797B File Offset: 0x00095B7B
		public override string ToString()
		{
			return "CNCFanucSeriesMessage";
		}
	}
}
